ReactiveViewHost() constructor¶
Defined in
Type: ReactiveViewHostReactiveUI.Reactive
Assembly: ReactiveUI.Reactive.dll
Applies to
net10.0-android36.0
Overloads¶
- 1.
protected ReactiveViewHost() - 2.
protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent) - 3.
protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent, bool attachToRoot) - 4.
protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent, bool attachToRoot, Action<ReactiveViewHost<TViewModel>, View> bind) - 5.
protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent, bool attachToRoot, bool performAutoWireup, ControlFetcherMixins.ResolveStrategy resolveStrategy)
1. Overload¶
protected ReactiveViewHost()
Summary: Initializes a new instance of the ReactiveViewHost class.
Remarks
This constructor performs no inflation or wiring and is AOT-safe. Derived types may assign View manually.
2. Overload¶
protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent)
Summary: Initializes a new instance of the ReactiveViewHost class by inflating a layout resource.
Parameters
| Name | Type | Description |
|---|---|---|
ctx | Context | The Android context. |
layoutId | int | The layout resource identifier. |
parent | ViewGroup | The parent view group. |
Remarks
This constructor is fully AOT- and trimming-safe and performs no reflection-based auto-wireup.
The inflated view is not attached to the parent.
3. Overload¶
protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent, bool attachToRoot)
Summary: Initializes a new instance of the ReactiveViewHost class by inflating a layout resource.
Parameters
| Name | Type | Description |
|---|---|---|
ctx | Context | The Android context. |
layoutId | int | The layout resource identifier. |
parent | ViewGroup | The parent view group. |
attachToRoot | bool | Whether to attach the inflated view to the parent. |
Remarks
This constructor is fully AOT- and trimming-safe and performs no reflection-based auto-wireup.
4. Overload¶
protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent, bool attachToRoot, Action<ReactiveViewHost<TViewModel>, View> bind)
Summary: Initializes a new instance of the ReactiveViewHost class by inflating a layout resource and invoking an explicit, AOT-safe binder callback.
Parameters
| Name | Type | Description |
|---|---|---|
ctx | Context | The Android context. |
layoutId | int | The layout resource identifier. |
parent | ViewGroup | The parent view group. |
attachToRoot | bool | Whether to attach the inflated view to the parent. |
bind | Action | A callback responsible for explicitly wiring child views to the host. |
Remarks
This constructor is fully AOT-safe and avoids reflection entirely.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when bind is null. |
5. Overload¶
Attributes: [RequiresUnreferencedCode("Legacy auto-wireup uses reflection and member discovery.")] [RequiresDynamicCode("Legacy auto-wireup relies on runtime type inspection.")]
protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent, bool attachToRoot, bool performAutoWireup, ControlFetcherMixins.ResolveStrategy resolveStrategy)
Summary: Initializes a new instance of the ReactiveViewHost class by inflating a layout resource and optionally performing reflection-based auto-wireup.
Parameters
| Name | Type | Description |
|---|---|---|
ctx | Context | The Android context. |
layoutId | int | The layout resource identifier. |
parent | ViewGroup | The parent view group. |
attachToRoot | bool | Whether to attach the inflated view to the parent. |
performAutoWireup | bool | If true, performs automatic wiring using reflection. |
resolveStrategy | [ResolveStrategy](# | The member resolution strategy used during auto-wireup. |
Remarks
This constructor exists for backward compatibility and is not trimming/AOT safe when
performAutoWireup is true.